package com.black.carbon.controller;

import com.black.carbon.entity.displaySet;
import com.black.carbon.service.DisplayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class DisplayController {
    @Autowired
    DisplayService displayService;

    @GetMapping("/test/{title}")
    public displaySet test(@PathVariable String title){
        return displayService.selectByTitle(title);
    }
}
